package models

import "time"

type School struct {
	//gorm.Model // 包含了ID, CreatedAt, UpdatedAt, DeletedAt四个字段
	Id          int64     `gorm:"column(id);size(20);auto_increment;null"`
	UtcCreate   time.Time `gorm:"column(utc_create);type(datetime);null"`
	UtcModified time.Time `gorm:"column(utc_modified);type(datetime);null"`
	SchoolName  string    `gorm:"column(school_name);size(256);not null"`
	Belong      string    `gorm:"column(belong);size(56);not null"`
	Location    string    `gorm:"column(localtion);size(255);not null"`
	Type        int       `gorm:"column(type);size(2);not null"`
}

// TableName 指定表名，如果不指定，GORM 会使用结构体名称的复数形式作为表名
func (School) TableName() string {
	return "school"
}
